//1. 引入mockjs
const Mock = require("mockjs");

//2. 调用mock方法生成随机的数据
let data = Mock.mock({
    "empList|4" : [
        {
            "id|+1" : 1,
            "name" : "@string",
            "price" : "@float",
            "status" : "@status",
            "birthday" : "@date",  // 2020-11-22
            "entryDate" : "@date('yyyy/MM/dd')",  //2020/11/22
            "createDate" : "@datetime",
            "updateDate" : "@datetime('yyyy/MM/dd HH-mm-ss')",
            "avatar" : "@image('60x60','#fb0a2a','png','hello')", 
            "title" : "@title",
            "ctitle" : "@ctitle(6,8)",
            "content" : "@csentence(20,40)",
            "nickname" : "@cname",
            "englishname" : "@name",
            "url" : "@url('https','usian.com')",
            "domain" : "@domain",
            "ip" : "@ip",
            "email" : "@email",
            "area" : "@region",
            "address" : "@county(true)",
            "zip" : "@zip",
        }
    ],
})



//3. 通过console.log()打印出随机的数据
console.log(JSON.stringify(data,null,2))

